package com.guli.secKill.vo;
/*
 * @Author 罗俊
 * @date 2020/12/2 - 3:10 下午
 *
 */

import com.guli.common.valid.SaveGroup;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 秒杀信息vo
 *
 */
@Data
public class SecKillInfoVo {

    /**
     * 用于参与秒杀的随机码
     */
    @NotEmpty(groups = SaveGroup.class,message = "要有随机码才能参与秒杀")
    private String randomCode;

    /**
     * 要秒杀的商品
     */
    @NotNull(groups = SaveGroup.class,message = "要输入商品id才能参与秒杀")
    private Long skuId;

    /**
     * 秒杀的场次id
     */
    @NotEmpty(groups = SaveGroup.class,message = "要输入秒杀的场次id才能参与秒杀")
    private String promotionSessionId;

    /**
     * 要秒杀的 spuId
     */
    @NotNull(groups = SaveGroup.class,message = "要输入秒杀的spuId才能参与秒杀")
    private Long spuId;

    /**
     * 购买的数量
     */
    @NotNull(groups = SaveGroup.class,message = "购买数量不能为空")
    private Integer number;
}
